using System.Windows;
using System.Windows.Input;
using WPFPractice.Dialogs;
using WPFPractice.Utils;
using WPFPractice.ViewModels;
using WPFTemplateLib.WpfHelpers;

namespace WPFPractice.Windows
{
	/// <summary>
	/// WinWindow.xaml 的交互逻辑
	/// </summary>
	public partial class WinWindow : Window
	{
		public WinWindow()
		{
			InitializeComponent();
			DataContext = new WindowViewModel();
		}
	}
}

namespace WPFPractice.ViewModels
{
	public class WindowViewModel : MyBindableBase
	{
		#region 命令

		#region [命令] 弹出蒙板弹窗
		private ICommand _ShowMaskDialogCmd;
		public ICommand ShowMaskDialogCmd => _ShowMaskDialogCmd ??= new RelayCommand<Window>(ExecuteShowMaskDialogCmd);
		private void ExecuteShowMaskDialogCmd(Window win)
		{
			win ??= Application.Current.MainWindow;
			new MaskDialog(win).ShowDialog();
		}
		#endregion

		#endregion
	}
}
